FROM debian:13.1-slim
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
ENV TZ=Asia/Shanghai
WORKDIR /usr/local/
ARG JAVA_VERSION
ARG JAVA_HOME
ADD graalvm-jdk-${JAVA_VERSION}_linux-x64_bin.tar.gz .
ENV JAVA_HOME=/usr/local/graalvm-jdk-${JAVA_HOME}
ENV PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
CMD ["java","-version"]


# https://www.graalvm.org/downloads/
# docker build --build-arg JAVA_VERSION=17 --build-arg JAVA_HOME=17.0.17+12.1 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/graalvm:17.0.17 .
# docker build --build-arg JAVA_VERSION=21 --build-arg JAVA_HOME=21.0.9+7.1 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/graalvm:21.0.9 .
# docker build --build-arg JAVA_VERSION=25 --build-arg JAVA_HOME=25.0.1+8.1 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/graalvm:25.0.1 .
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/graalvm:17.0.17 
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/graalvm:17.0.17